import React from 'react';
import ReactDOM from 'react-dom';
import './index.less';
import registerServiceWorker from './registerServiceWorker';
import axios from 'axios'



import Menu from './component/menu/menu'
import Activity from './component/activity/activity'
import Goods from './component/goods/goods'
import Category from './component/category/category'
import ImageUpload from './component/imageUpload/imageUpload'
import {
  HashRouter,
  BrowserRouter,
  Route,
  Switch
} from 'react-router-dom'
React.api = axios


ReactDOM.render((
  <HashRouter>
      <div id='pageView'>
         <div id='left_cont'>
          	<Menu />
         </div>
         <div id='right_cont'>
          	 <Switch>
                   <Route path="/goods" component={Goods}></Route>
                   <Route path='/activity' component={Activity}></Route>
                   <Route path='/category' component={Category}></Route> 
                   <Route path='/imageUpload' component={ImageUpload}></Route> 
              </Switch>    
          </div>       
        </div>
  </HashRouter>


), document.getElementById('root'));
registerServiceWorker();